<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>

        /* 
         实现参数的自增
          tpm1++等价于tmp1 = tmp1+1
         */
        var tmp1=100;
        console.log(tmp1);
        // tmp1=tmp1+1;
        // tmp1++;
        ++tmp1;
        console.log(tmp1);

        //区别
        var tmp2=200;
        console.log(tmp2++ + 1);//201
        console.log(tmp2);      //201

        var tmp3=300;
        console.log(++tmp3 + 1);//302
        console.log(tmp3);      //301
    </script>
</head>
<body>
    
</body>
</html>